package study.zhujie;

import study.zhujie.yinru.ParentInterface;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class ZhujieCompare {

    @Qualifier("childA")
    @Autowired
    private ParentInterface parentInterface;
    @Resource(name = "childA")
    private ParentInterface ChildA;
    @Resource(name = "childB")
    private ParentInterface ChildB;

    public String testAu() {
        return parentInterface.testRes();
    }

    public String testResA() {
        return ChildA.testRes();
    }

    public String testResB() {
        return ChildB.testRes();
    }
}
